#include "ClassScope.h"
#include "FunctionScope.h"

ClassScope::ClassScope(const ClassDefPtr& node, Scope* parentScope)
    : Scope(parentScope),
      _classAst(node)
{
    _classAst->traverse(this);
}


void ClassScope::visitFunctionDef(const FunctionDefPtr &node)
{
    FunctionScope * fnc = new FunctionScope(node, this);
    _childScopes.append(fnc);
    _names[node->name()->id()] = fnc;
}
